import { Resolver, Query, Args } from '@nestjs/graphql';
import { ChannelService } from './channel.service';

@Resolver()
export class ChannelResolver {

  constructor(private readonly channelService: ChannelService) {}

  @Query('channel')
  async getChannel(@Args('id') id: number) {
    return this.channelService.findOneById(id);
  }
}
